package cn.edu.wfit.modules.infomanagement.domain;

import cn.edu.wfit.common.core.annotation.Excel;
import cn.edu.wfit.common.core.web.domain.BaseEntity;import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 存储教师预约记录对象 t_bus_reservation
 *
 * @author zhanghao
 * @date 2025-11-07
 */
public class TBusReservation extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键（自增），唯一预约标识
     */
    private Long id;

    /**
     * 关联 t_bus_schedule.id
     */
    @Excel(name = "关联 t_bus_data.id")
    private Long dateId;

    /**
     * 教师姓名
     */
    @Excel(name = "教师姓名")
    private String realname;

    /**
     * 工号
     */
    @Excel(name = "工号")
    private String teacherCode;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phone;

    /**
     * 关联学院id
     */
    @Excel(name = "关联学院名称")
    private String collegeName;

    /**
     * 至目的地是否有课(1有课2无课)
     */
    @Excel(name = "至目的地是否有课(1有课2无课)")
    private Long isClass;

    /**
     * 预约状态（1 = 预约成功，2 = 候补，3 = 已取消）
     */
    @Excel(name = "预约状态", readConverterExp = "1=,==,预=约成功，2,==,候=补，3,==,已=取消")
    private Long reservationStatus;

    /**
     * 候补队列序号（仅对教师有效）
     */
    @Excel(name = "候补队列序号", readConverterExp = "仅=对教师有效")
    private Long queueNum;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 取消预约时间（状态 = 3 时非空）
     */
    @Excel(name = "取消预约时间", readConverterExp = "状=态,==,3=,时=非空")
    private Date cancelTime;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setDateId(Long dataId) {
        this.dateId = dataId;
    }

    public Long getDateId() {
        return dateId;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getRealname() {
        return realname;
    }

    public void setTeacherCode(String teacherCode) {
        this.teacherCode = teacherCode;
    }

    public String getTeacherCode() {
        return teacherCode;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setCollegeId(Long collegeId) {
        this.collegeName = collegeName;
    }

    public String getCollegeName() {
        return collegeName;
    }

    public void setIsClass(Long isClass) {
        this.isClass = isClass;
    }

    public Long getIsClass() {
        return isClass;
    }

    public void setReservationStatus(Long reservationStatus) {
        this.reservationStatus = reservationStatus;
    }

    public Long getReservationStatus() {
        return reservationStatus;
    }

    public void setQueueNum(Long queueNum) {
        this.queueNum = queueNum;
    }

    public Long getQueueNum() {
        return queueNum;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    public Date getCancelTime() {
        return cancelTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("dateId", getDateId())
                .append("realname", getRealname())
                .append("teacherCode", getTeacherCode())
                .append("phone", getPhone())
                .append("collegeName", getCollegeName())
                .append("isClass", getIsClass())
                .append("reservationStatus", getReservationStatus())
                .append("queueNum", getQueueNum())
                .append("createTime", getCreateTime())
                .append("cancelTime", getCancelTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
